const Router = require('koa-router')
const chapterRouter = require('./chapter')
const userRouter = require('./user')
const fileRouter = require('./file')
const examRouter = require('./exam')
const questionRouter = require('./question')
const questionFavRouter = require('./questionFav')
const activeCodeRouter = require('./activeCode')
const errorQuestionRouter = require('./errorQuestion')
const examHistoryRouter = require('./examHistory')
const userActiveExamRouter = require('./userActiveExam')
const paperRouter = require('./paper')

const router = new Router({
  prefix: '/api/v1'
})

router.use('/user', userRouter.routes())
router.use('/file', fileRouter.routes())
router.use('/chapter', chapterRouter.routes())
router.use('/exam', examRouter.routes())
router.use('/question', questionRouter.routes())
router.use('/questionFav', questionFavRouter.routes())
router.use('/activeCode', activeCodeRouter.routes())
router.use('/errorQuestion', errorQuestionRouter.routes())
router.use('/examHistory', examHistoryRouter.routes())
router.use('/userActiveExam', userActiveExamRouter.routes())
router.use('/paper', paperRouter.routes())

module.exports = router
